package com.reggie.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reggie.pojo.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface DishDao extends BaseMapper<Dish> {

    @Update("update dish set status = #{status} where id = #{id};")
    int updateStatusById(Integer status, Long id);

    @Select("select * from dish where category_id = #{ids};")
    List<Dish> selectByCategoryId(Long ids);
}
